{extend name="Base/common"}
{block name='header'}
    {include file="Public/header1"}
{/block}

{block name='body'}
    <div class="layout-center">
        {foreach name='lists' item='item' key='key'}
            <div class="box" style="min-height: 50px;">
                <div class="box-title">
                    <span><b class="icon2"></b>{$key}</span>
                    <div style="font-size: 14px; margin-left: 10px; float: right;">
                        <em></em> </div>
                </div>
                <ul>
                    {volist name='item' id='vo'}
                        <li class="worker-warp">
                            <div class="worker-warp-photo" id="worker-warp-photo-0" data-id="0" data-value="/rsp/WorkPhoto.ashx?id=d31e2618-98e0-4c59-812a-a67a00a5e4a3">
                                <img id="worker-photo-0" src="{$vo.headimgurl}" style="display: inline; width: 136.714px; height: 182px; margin-left: 5.64319px; margin-top: 0px;">
                                </div>
                                <div class="worker-warp-info">
                                    <p class="worker-warp-info-name" style='margin-top:10px' >{$vo.truename}</p>
                                    <p style='margin-top:10px' >
                                        {$vo.mobile}</p>
                                    <p style='margin-top:10px' >
                                        <em>性别： {$vo.sex == 0 ? '男' : '女'}</em></p>
                                    <p style='margin-top:10px display: none' class="praise">
                                        <em class="zan" onclick="Praise('d31e2618-98e0-4c59-812a-a67a00a5e4a3')"></em> <em id="d31e2618-98e0-4c59-812a-a67a00a5e4a3">赞（29）</em>
                                    </p>
                                </div>
                        </li>
                    {/volist}
                </ul>
                <div style="clear: both;">
                </div>
            </div>
        {/foreach}
        <script type="text/javascript">
        $(function() {
            if (loginuser == "0") { $(".praise").css("display", "none"); } else if ('1' == '0' && loginuser != "0") { $(".praise").css("display", "none"); } else { $(".praise").css("display", "block"); }
            $(".worker-warp-photo").each(function() {
                var pid = $(this).attr("data-id");
                var purl = $(this).attr("data-value");
                $("#worker-photo-" + pid).loadthumb({
                    imgId: "worker-photo-" + pid,
                    parentId: "worker-warp-photo-" + pid,
                    src: purl
                });
            });
        });

        function Praise(id) {
            $.post('/rsp/site/savepraise', {
                id: encodeURIComponent(id),
                uid: encodeURIComponent(loginuser)
            }, function(data) {
                if (isNaN(parseInt(data)) == false) {
                    $("#" + id).html("赞（" + data + "）");
                    showMsg("提示", "恭喜您点赞成功！");
                } else {
                    showMsg("提示", data);
                }
            });
        }
        </script>
        <div style="clear: both;">
        </div>
    </div>
{/block}

{block name='footer'}
    {include file='Public/footer1'}
{/block}